import axiosApi from './AxiosApi.js'

const apiList = {
    page: {
        method: 'GET',
        url: `/web-manager/transfor-center/bussiness/truckType/page`
    },
    save: {
        method: 'POST',
        url: `/web-manager/transfor-center/bussiness/truckType`
    },
    update: {
        method: 'PUT',
        url: `/web-manager/transfor-center/bussiness/truckType`
    },
    delete: {
        url: `/web-manager/transfor-center/bussiness/truckType/delete`,
        method: 'POST'
    },
    // 查询车辆类型信息列表
    allTreeCarType: {
        method: 'GET',
        url: `/web-manager/common/truckType/simple`
    },
}

export default {
    page (data) {
        return axiosApi({
            ...apiList.page,
            formData: true,
            data
        })
    },
    save (data) {
        return axiosApi({
            ...apiList.save,
            data
        })
    },
    update (data) {
        return axiosApi({
            ...apiList.update,
            data
        })
    },
    delete (data) {
        return axiosApi({
            ...apiList.delete,
            data
        })
    },
    allTreeCarType (data) {
        return axiosApi({
            ...apiList.allTreeCarType,
            data
        })
    }
}
